<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../vue@3.2.23.js"></script>
	</head>
	<body>
		<div id="app">
			<layout>
			 <template v-slot:header>
				<div>header</div>
			 </template>
			 <!-- v-slot的缩写 #footer-->
			 <template #footer>
				<div>footer</div>
			 </template>
			</layout>
		</div>
	</body>
</html>
<script>
	//具名插槽
	const app = Vue.createApp({
		data(){
			return{
				connt:20
			}
		}
	});
	app.component('layout',{
		template:
		`
		<slot name="header"></soft>
		<div>content</div>
		<slot name="footer"></soft>	
		`
	})
	const vm = app.mount("#app")
</script>